package com.huang.Controller;


import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

//@RestController
public class NacosConfigController {


    @Resource
    private ConfigurableApplicationContext applicationContext;

    @GetMapping(value = "/test-config01")
    public String testConfig01(){
        return applicationContext.getEnvironment().getProperty("config.appName");
//        return "nacos";
    }

}

